package com.ywz.project.base.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 中国地区表
 * </p>
 *
 * @author ywz
 * @since 2024-10-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "TChina对象", description = "中国地区表")
public class TChina implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "行政区划代码")
    private Integer code;

    @ApiModelProperty(value = "名称")
    private String name;

    @ApiModelProperty(value = "上级id")
    private Integer pid;

    @ApiModelProperty(value = "类型")
    private String type;

    @TableField(exist = false)
    @ApiModelProperty(value = "子节点")
    private List<TChina> children;
}
